﻿<s:SurfaceWindow x:Class="Samples.CoverFlow.SurfaceWindowMain"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:s="http://schemas.microsoft.com/surface/2008"
                 xmlns:tk="clr-namespace:Black.SurfaceToolkit.Controls;assembly=Black.SurfaceToolkit"
                 xmlns:sys="clr-namespace:System;assembly=mscorlib"
                 Title="Samples.CoverFlow">
    <s:SurfaceWindow.Resources>
        <ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/WindowBackground.jpg" />
        <!--<SolidColorBrush x:Key="WindowBackground" Color="White" />-->
    </s:SurfaceWindow.Resources>
    
    <Grid Background="{StaticResource WindowBackground}" Width="1024" Height="768">
       
        <tk:CoverFlow Width="400" Height="200" RenderTransformOrigin="0.5,0.5" Margin="0,0,0,200" x:Name="oCoverFlow">
            <tk:CoverFlow.RenderTransform>
                <ScaleTransform ScaleX="2.0" ScaleY="2.0" />
                <!--<ScaleTransform ScaleX="1.0" ScaleY="1.0" />-->
            </tk:CoverFlow.RenderTransform>
            
            <tk:CoverFlow.Resources>
                <DataTemplate DataType="{x:Type sys:Int32}">
                    <Border Height="80" Width="80" Background="Gray" BorderBrush="DarkGray" BorderThickness="1" CornerRadius="3">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            
                            <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding}" Grid.ColumnSpan="2" FontSize="20" />

                            <s:SurfaceButton Grid.Row="1" Grid.Column="0" Padding="0"
                                             Command="tk:CoverFlowItemCommands.MoveOf" CommandParameter="-1">
                                <TextBlock>&lt;&lt;</TextBlock>
                            </s:SurfaceButton>
                            <s:SurfaceButton Grid.Row="1" Grid.Column="1" Padding="0"
                                             Command="tk:CoverFlowItemCommands.MoveOf" CommandParameter="1">
                                <TextBlock>&gt;&gt;</TextBlock>
                            </s:SurfaceButton>
                        </Grid>
                    </Border>
                </DataTemplate>
            </tk:CoverFlow.Resources>
            <sys:Int32>0</sys:Int32>
            <sys:Int32>1</sys:Int32>
            <sys:Int32>2</sys:Int32>
            <sys:Int32>3</sys:Int32>
            <sys:Int32>4</sys:Int32>
            <sys:Int32>5</sys:Int32>
            <sys:Int32>6</sys:Int32>
        </tk:CoverFlow>
        
        <s:SurfaceCheckBox VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,100"
                           Foreground="White" FontSize="20"
                           Checked="RandomSurfaceCheckBoxChecked" Unchecked="RandomSurfaceCheckBoxUnchecked">
            Mouvements aléatoires
        </s:SurfaceCheckBox>
    </Grid>
</s:SurfaceWindow>
